Accessing protected method of anonymous object vs by a named reference